import Vue from 'vue'
import Vuex from 'vuex'
import user from "./modules/user.js";
import car from "./modules/car.js";
import users from "./modules/users";
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({

    modules: { //模块化
        user,
        car,
        users
    },
    plugins: [createPersistedState({
        key: 'myStore',
        storage: window.sessionStorage
    })]
})